import 'package:kmxy_base/base/base_package.dart';
import 'package:kmxy_base_example/page/page_manage_package.dart';

abstract class NetworkPageState extends BasePageState<NetworkPage> {
  String netData = "";

  click() {
    loadingShow();
    // 首先在main.dart中初始化net
    Net.get("https://music.91q.com/v1/index?sign=953bb2fa46f90c0c7aa1090fe99010d3&pageSize=12&type=song&appid=16073360&timestamp=1693965726", headers: {"qaz": 123}, success: (data) {
      loadingDismiss();
      // 成功的
      setState(() {
        netData = data.toString();
      });
    }, error: (error) {
      loadingDismiss();
      // 失败
      // error.toString().log();
    });
  }
}
